﻿using System.Windows.Forms;

namespace SPDevExplorer
{
    public partial class SiteExplorer
    {
        #region Delegates

        public delegate void ChangePropertiesDelegate(ref object[] propertyObjects);

        #endregion

        public ChangePropertiesDelegate OnPropertyObjectsChanged;

        private void SetPropertiesWindow(TreeNode node)
        {
            if (node.Tag == null) return;
            FileProperties p = new FileProperties(node);

            object props = null;

            if (p.Xml.Name == "File")
                props = p;
            else if (p.Xml.Name == "Folder")
                props = new FolderProperties(node);
            else if (p.Xml.Name == "Web")
            {
            }

            object[] arPropObjs = new object[] {props};
            if (OnPropertyObjectsChanged != null) OnPropertyObjectsChanged(ref arPropObjs);
        }
    }
}